package com.frank.subject.infra.basic.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.frank.subject.infra.basic.entity.SubjectCategory;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author Frank Zou
 * @version v0.0.1
 * @date 2024/3/5
 * @description 
 */
@Mapper
public interface SubjectCategoryMapper extends BaseMapper<SubjectCategory> {

    /**
     * query category by primary
     * @param subjectCategory category
     * @return category list
     */
    List<SubjectCategory> queryCategoryByPrimary(SubjectCategory subjectCategory);

    /**
     * Query category id
     *
     * @param categoryId category id
     * @return count
     */
    Integer querySubjectCount(@Param("categoryId") Long categoryId);

}